var info : String;
var pcInfo : TextMesh;
var processingInfo : boolean;
function OnGUI()
{
	if(!processingInfo)
	{
		if(GUI.Button(Rect(200,200,200,30),"When are my Pc?"))
		{
			processingInfo = !processingInfo;
			checkOperatingSystem(SystemInfo.operatingSystem);
			checkProcessorType(SystemInfo.processorType);
			checkMemorySize(SystemInfo.systemMemorySize);
			checkVideoName(SystemInfo.graphicsDeviceName);
			checkVideoMemory(SystemInfo.graphicsMemorySize);
			checkShaderType(SystemInfo.graphicsShaderLevel);
			pcInfo.text = info;
		}
	}
}

function checkOperatingSystem(system : String)
{
	info += "Operating System: " + system + "\n";
}
function checkProcessorType(processor : String)
{
	info += "Processor: " + processor + "\n";
}
function checkShaderType(shaderInt : int)
{
	if(shaderInt == 30)
	{
		info += "Pixel Shader 3.0" + "\n";
	}
	
	if(shaderInt == 20)
	{
		info += "Pixel Shader 2.x" + "\n";
	}
	
	if(shaderInt == 10)
	{
		info += "Pixel Shader 1.x" + "\n";
	}
}
function checkMemorySize(size : int)
{
	info += "Memory Ram: " + size + "MB \n";
}
function checkVideoName(name : String)
{
	info += "Graphics Video Name: " + name + "\n";
}
function checkVideoMemory(size : int)
{
	info += "Video Memory: " + size + "MB \n";
}